package com.example.api.gateway.filter;

import com.netflix.zuul.ZuulFilter;

//@Component
public class ThrowExceptionFilter extends ZuulFilter{

	@Override
	public Object run() {
		doSomething();
		return null;
	}

	private void doSomething() {
		throw new RuntimeException("Exist some error ....");
	}

	@Override
	public boolean shouldFilter() {
		return true;
	}

	@Override
	public int filterOrder() {
		return 0;
	}

	@Override
	public String filterType() {
		return "pre";
	}

}
